package com.coldchain.admin.config.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.coldchain.common.vo.TreeNodeVo;


import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author fangliai
 * @since 2018-11-09
 */
@TableName("ch_goods_classify")
public class GoodsClassify extends TreeNodeVo<GoodsClassify> implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer goodsClassifyId;

    /**
     * 分类名称
     */
    @NotNull(message = "请输入商器分类")
    private String name;

    private String pinyin;

    /**
     * 图标
     */
    private String icon;

    private Integer hot;

    /**
     * 排序权重
     */
    private Integer sort;

    /**
     * 根节点
     */
    @TableField("parentId")
    private Integer parentId;

    /**
     * 创建时间
     */
    @TableField("createTime")
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    @TableField("createBy")
    private String createBy;


    public Integer getGoodsClassifyId() {
        return goodsClassifyId;
    }

    public void setGoodsClassifyId(Integer goodsClassifyId) {
        this.goodsClassifyId = goodsClassifyId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getHot() {
        return hot;
    }

    public void setHot(Integer hot) {
        this.hot = hot;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Override
    public Object getNodeId() {
        return goodsClassifyId;
    }

    @Override
    public Object getParentId() {
        return parentId;
    }


    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Override
    public String toString() {
        return "GoodsClassify{" +
        "goodsClassifyId=" + goodsClassifyId +
        ", name=" + name +
        ", pinyin=" + pinyin +
        ", icon=" + icon +
        ", hot=" + hot +
        ", sort=" + sort +
        ", parentId=" + parentId +
        ", createTime=" + createTime +
        ", createBy=" + createBy +
        "}";
    }
}
